libxc: make xc_domain_maximum_gpfn() endianness-agnostic
authorJan Beulich <jbeulich@suse.com>
Thu, 24 Jun 2021 14:40:57 +0000 (16:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 24 Jun 2021 14:40:57 +0000 (16:40 +0200)
commit190facdf877c8fc298dafa584f69e7aff8606c35
treebff4f8495a212bafed5fbe02df7e466050e081ae
parent7ffbed8681a0ab203535ab1e13c48f18ecdba907
libxc: make xc_domain_maximum_gpfn() endianness-agnostic

libxc generally uses uint32_t to represent domain IDs. This is fine as
long as addresses of such variables aren't taken, to then pass into
hypercalls: To the hypervisor, a domain ID is a 16-bit value. Introduce
a wrapper struct to deal with the issue. (On architectures with
arguments passed in registers, an intermediate variable would have been
created by the compiler already anyway, just one of the wrong type.)

The public interface change is both source and binary compatible for
the architectures we currently support.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/ctrl/xc_domain.c
xen/common/memory.c
xen/include/public/memory.h